﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DatabaseUserTest
{
    class Destenation
    {
        public object destinationfind(string destination)
        {
            using (var db = new DatabaseContext())
            {
                var query = from b in db.Destinations
                            select b;
                foreach (var item in query)
                {
                    if (item.Name == destination)
                    {
                        return item;
                    }
                }
                return null;
            }
        }
    }
}
